<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/js.vue.js"></script>
</head>
<body>
       <div  id="app">
               <!-- <hello v-model="title"> </hello> -->
               <com-name v-model:f-name="flstname" v-model:l-name="listname"></com-name>
               {{flstname}}:{{listname}}
            </div>
       <script>
       let app=Vue.createApp({
        data(){
            return{
                    title:"",
                    flstname:"",
                    listname:""
                }
            },
        components:{
            hello:{
                props:["modelValue"],
                emits:['update:modelValue'],
                template:`<input :value="modelValue" @input="$emit('update:modelValue',$event.target.value)"/>`
            },
            ComName:{
                props:{
                      fName:String,
                      lName:String
                },
                emits:["update:fName","update:lName"],
                    template:`
                    <input :value="fName" @input="$emit('update:fName',$event.target.value)">
                    <input :value="lName" @input="$emit('update:lName',$event.target.value)">
                    `
            }
        }
    });
       app.mount("#app")
       </script>
</body>
</html>